#ifndef KBTITLE_H
#define KBTITLE_H

#include <QWidget>
#include <QPushButton>
#include <QMap>

class KBTitle : public QWidget
{
    Q_OBJECT
public:
    KBTitle(QWidget *parent = nullptr);
    virtual ~KBTitle();

public:
    void adjustGeometry(double lfWidthScale, double lfHeightScale, bool isVertical = false, bool floatStatus = false);

public Q_SLOTS:
    void onBtnClicked();

Q_SIGNALS:
    void btnClicked(QString keyName);

private:
    void initUI();
    void initConnections();

private:
    QPushButton *m_btnFloat = nullptr;
    QPushButton *m_btnClose = nullptr;
    QMap<QPushButton*, QRect> m_mapSubGeometrys;
    bool floatStatus = false;
};

#endif // KBTITLE_H
